//package com.hibase.demo.mq;
//
//import com.hibase.core.mq.component.HibaseDelayQueueUtil;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import java.util.concurrent.TimeUnit;
//
////消息发送
//@Component
//@EnableScheduling
//public class QueueTask {
//
//    @Autowired
//    private TestQueue testQueue;
//
//    @Autowired
//    private HibaseDelayQueueUtil hibaseDelayQueueUtil;
//
//
////    @Scheduled(cron = "0/5 * * * * ?")
////    public void queue1Task(){
////        //定义好消息队列的接口可直接调用，不需要管实现，实现由代理完成
////        testQueue.sendMessage1("生产Msg:[" + (int)(Math.random() * Integer.MAX_VALUE) + "]");
////    }
////
////    @Scheduled(cron = "0/10 * * * * ?")
////    public void queue2Task(){
////        testQueue.sendMessage2(Arrays.asList("Hello ","World."));
////    }
//
//    @Scheduled(cron = "*/5 * * * * ?")
//    public void delayQueueTask(){
//        hibaseDelayQueueUtil.offer("delay_queue",
//                "生产Msg:[" + Math.random() + "]",
//                10L,
//                TimeUnit.SECONDS);
//    }
//}